After completing this lesson, you'll be able to:
Creating attributes and setting a value are probably the primary attribute functions used within FME. When an attribute is created, its value can be set in a number of ways.
The transformers capable of creating an attribute - and setting its value - are:
For most operations we'll concentrate on the AttributeManager, so here is a quick overview of that transformer.
The AttributeManager parameters dialog has a number of fields: Input Attribute, Output Attribute, Attribute Value, and Action. Uniquely among attribute-handling transformers, it is automatically filled in with the details of the attributes connected to it:
The action field can be set by the user but is also set automatically when a change is made to the other fields.
By entering a new attribute name into the Output Attribute field, it will be created in the output.
The text <Add new Attribute> highlights where a new attribute can be created. By default, when the Attribute Value field is empty, a new attribute has no value.
A fixed (or constant) value for an attribute can be created by simply entering a value into the Attribute Value field:
Here, for example, a new attribute called City is being given a fixed value of Vancouver.
However, also note that the existing attribute NeighborhoodName is also being assigned a fixed value. It has been given the value "Kitsilano." Notice how by entering a value into that field, the Action field has automatically changed from "Do Nothing" to "Set Value."